package cn.remexs.doris.geo.udf;


import cn.remexs.doris.geo.GeoUtils;
import org.apache.hadoop.hive.ql.exec.UDF;

/**
 * gcj02转百度09
 */
public class Gcj02ToBd09 extends UDF {
    public String evaluate(Double lon, Double lat) {
        if (null == lon || null == lat) return null;
        double[] bd09 = GeoUtils.gcj02ToBd09(lon, lat);
        return GeoUtils.buildWkt(bd09[0], bd09[1]);
    }
}